#include<stdio.h>
#include<unistd.h>
#include<sys/wait.h>

int main()
{
  pid_t id=fork();
  if(id==0)
  {
    int cnt=5;
    while(1)
    {
      printf("I am child  pid is :  %d  getppid is :  %d  \n",getpid(),getppid());
      sleep(1);
    }
  }
  else 
  {
    int cnt=5;
    while(cnt--)
    {
      printf("I am father  pid is :  %d  getppid is: %d \n",getpid(),getppid());
      sleep(1);
    }
  }
}
